package com.sadhoc.router.topology;

public class NodePair {
	
	private String originator;
	private String advertisedNode;
	
	public NodePair(String originator, String advertisedNode) {
		this.originator = originator;
		this.advertisedNode = advertisedNode;
	}
	
	public String getOriginator() {
		return originator;
	}
	
	public void setOriginator(String originator) {
		this.originator = originator;
	}
	
	public String getAdvertisedNode() {
		return advertisedNode;
	}
	
	public void setAdvertisedNode(String advertisedNode) {
		this.advertisedNode = advertisedNode;
	}
	
	public boolean equals(Object obj) {
		NodePair o = (NodePair) obj;
		return ((originator.equals(o.getOriginator())) && (advertisedNode.equals(o.getAdvertisedNode())));
	}
	
	public int hashCode() {
		return (originator.hashCode() + advertisedNode.hashCode());
	}
	
}
